
    layui.use("layer", function () {
        var layer = layui.layer;
    });



function login() {
    var oldPass = $("#oldPassword").val();
    var newPass = $("#newPassword1").val();
    var newPassCopy = $("#newPassword2").val();
    if(newPass!=newPassCopy) {
        layer.msg("两次新密码输入不一致，请重试",{icon:5});
        return;
    }


    $.post("/sharepark/user/resetPassword","oldPass="+oldPass+"&newPass="+newPass,function (result) {

        if (result.code == 200) {
            window.location.href = "carIndex";
        }
        layer.msg(result.msg);
    })
}